package com.cos.hospital.ui.main.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentStatePagerAdapter;

public class FragmentAdapter extends FragmentStatePagerAdapter {

    Fragment[] list;

    public FragmentAdapter(FragmentManager fm, Fragment[] list) {
        super(fm);
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return list[position];
    }

    @Override
    public int getCount() {
        return list.length;
    }
}

